Editor-DateSpinLists

Description

Inserts an Editor for editing a value in a date control using SpinList controls for the day/month/year values. IMPORTANT: This control MUST be inserted inside an Editor-Set control.

images/ds.png
An editor date-spin-list.

Editor-DateSpinLists make it easy to select a date on a Form View control when using a mobile device. When selecting a date users can use their fingers to scroll through the days, months, and years in order to select a date. Because this is an editor, only one Editor-DateSpinLists needs to be defined in order to use it in multiple places within the UX component.

Add a Editor-DateSpinLists to update a FormView

  1. In the UX Builder on the UX Controls page open the 'Data Controls' menu. Click on the [List] option to add a list control.

    images/ds2.png
  2. Highlight the list control in the control tree. In the properties list on the right click the [...] button next to the 'List properties' in the 'List Properties' section. The List Builder will open.

    images/ds3.png
  3. On the List Builder's 'Data Source' pane set the 'Data Source Type' to 'Static'.

    images/ds4.png
  4. In the properties list click the [...] button next to the 'Static data' property in the 'Static Data' section.

    images/ds5.png
  5. In the 'Static Choices' dialog click the 'Sample data' button. Select the 'Name and addresses' sample data set in 'CR-LF format' and click OK.

    images/ds6.png
  6. In the 'Static Choices' dialog add a pipe '|' character and a 'Date' field to the title row of the data set and click OK. The title row should look like this:

    Firstname|Lastname|City|State|Date
    images/ds7.png
  7. On the 'List Layout' pane use the blue > arrow to move the five data fields from the 'Available Fields' list to the 'Columns in List' section. Click OK to close the List Builder.

    images/ds8.png
  8. Highlight the list control in the control tree. Open the 'Other Controls' menu and select the [Form View] option to add a Form View control to the component.

    images/ds9.png
  9. Highlight the 'Form View' control in the control tree. Open the 'Containers' menu and click on the [Container] option.

    images/ds10.png
  10. In the 'Container Type' list select the 'EditorSet' option and click 'Insert After'.

    images/ds11.png
  11. Highlight the Editor Set. Open the 'Defined Controls' menu and click on the 'Editor-DateSpinLists' option to add this editor to the editor-set.

    images/ds12.png
  12. Highlight the 'Form View' control in the control tree. In the properties list on the right click the [...] button next to the 'Form properties' property. The Form View Builder will open.

    images/ds13.png
  13. On the Form View Builder's 'Data Source' set the 'Datasource type' property to 'List'.

    images/ds14.png
  14. Click the [...] button next to the 'List name' property and select 'list1'.

    images/ds15.png
  15. Open the 'Form Layout' pane and click the 'Add item' button.

    images/ds16.png
  16. In the 'Select Control Type' dialog set the 'Category' menu to 'Data Controls'. In the 'Control' menu click on the [Label] option. Highlight all of the fields from the list on the right and click OK.

    images/ds17.png
  17. Click the 'Add item' button again.

    images/ds18.png
  18. In the 'Category' list select the 'Pre-defined Controls' option and in the 'Control' list select the [Save Form Edits/Cancel Edits Button] option. Click OK.

    images/ds19.png
  19. Open the 'Fields' pane and highlight the 'Date' field in the 'Fields in Data Source' list.

    images/ds20.png
  20. Click the [...] button next to the 'Editor set' property, in the Editing section of the 'Date' field's properties list.

    images/ds21.png
  21. In the Select Editor dialog set the 'Editor Set' to be 'EDITORSET_1' and the 'Editor' to be 'EDITOR_1'. Click OK

    images/ds22.png
  22. Scroll down the 'Date' field's properties to the 'Display Format' section. Click the [...] button next to the 'Display format' property.

    images/ds23.png
  23. The 'Display Format' dialog will open. Set the 'Display format type' property to be 'Date'.

    images/ds24.png
  24. Leave the 'Input type' property as 'String' and the 'Date input format' property set to 'Server-side Date Format'.

    images/ds25.png
  25. Set the 'Date output format' to be MM/dd/yyyy. Click OK.

    images/ds26.png
  26. Click OK to close the Form View Builder and run the component in Live Preview.

    images/ds27.png
  27. Click on a row in the list control, the formview that will allow you to edit the data should open.

    images/ds28.png
  28. Click on the date item in the Form View control. The 'Editor-DateSpinLists' should open.

    images/ds29.png
  29. Change the date and add the change to the form view. Click save to add the change to the list.

    images/ds30.png